package com.yupi.web.config;

import com.yupi.web.aop.inteceptor.ApiNumberInteceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


@Configuration
@Slf4j
public class MyInteceptorConfig implements WebMvcConfigurer {


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        log.info("接口次数统计拦截器执行中");
       registry.addInterceptor(new ApiNumberInteceptor()).addPathPatterns("/**");
    }
}
